package main

import (
	"WORKSPACE/dao"
	"WORKSPACE/pkg/setting"
	"WORKSPACE/routers"
	"fmt"
)

func init()  {
	setting.Setup()
	dao.Setup()

}

func main()  {
	//gin.SetMode(setting.ServerSetting.RunMode)

	//dao.GetAllallwage()
	//dao.GetAlldepartmentwage()
	//dao.GetAllemployesswage()

	endPoint := fmt.Sprintf(":%d",setting.ServerSetting.HttpPort)
	routersInit := routers.InitRouter()
	routersInit.Run(endPoint)

	//if err != nil {
	//	return
	//}

	//AttendanceData := models.Attendance{"2019082220",25,"三月",1,6,8,5,1,}
	//AttendanceData1 := models.Attendance{"2019082220",6,"三月",6,6,6,6,6,}
	//services.Delattendance("2019082220","三月")
	//services.Addattendance(AttendanceData)
	//services.Updateattendance(AttendanceData1)
	//
	//err,info,total := services.GetAllattendance()
	//fmt.Println(info)
	//fmt.Println(total)
	//if err != nil{
	//	panic(err)
	//}

	//DepartmentData := models.Department{"文艺体育部","0311","王鹤潼"}
	//DepartmentData1 := models.Department{"文艺体育部","0311","李文明"}
	//services.Deldepartment("0311")
	//services.Adddepartment(DepartmentData)
	//services.Updatedepartment(DepartmentData1)
	//
	//err,info,total := services.GetAlldepartment()
	//fmt.Println(info)
	//fmt.Println(total)
	//if err != nil{
	//	panic(err)
	//}

	//EmployessData := models.Employess{"2019082222","曹俊","男","2001.05.22","0314","学生","10级","安全攻城狮","幼儿园","人族","籍贯","地球","2019.06.01"}
	//EmployessData1 := models.Employess{"2019082222","李文明","男","2001.05.22","0314","学生","10级","安全攻城狮","幼儿园","人族","籍贯","地球","2019.06.01"}
	//services.Delemployess("2019082222")
	//services.Addemployess(EmployessData)
	//services.Updateemployess(EmployessData1)
	//
	//err,info,total := services.GetAllemployess()
	//fmt.Println(info)
	//fmt.Println(total)
	//if err != nil{
	//	panic(err)
	//}

	//OvertimeData := models.Overtime{"2019082220",20,20,"三月"}
	//OvertimeData1 := models.Overtime{"2019082220",60,60,"三月"}
	//services.Delovertime("2019082220","三月")
	//services.Addovertime(OvertimeData)
	//services.Updateovertime(OvertimeData1)
	//
	//err,info,total := services.GetAllovertime()
	//fmt.Println(info)
	//fmt.Println(total)
	//if err != nil{
	//	panic(err)
	//}

	//WdataData := models.Wdata{"2019082220","十月",200,200,200,200,200,200,200}
	//WdataData1 := models.Wdata{"2019082220","十月",300,300,300,300,300,300,300}
	//services.Delwdata("2019082220","十月")
	//services.Addwdata(WdataData)
	//services.Updatewdata(WdataData1)
	//
	//err,info,total := services.GetAllwdata()
	//fmt.Println(info)
	//fmt.Println(total)
	//if err != nil{
	//	panic(err)
	//}



}